<html>

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="description" content="TingGe Blog Agile agile JavaScript NodeJS">
  <meta name="author" content="TingGe<505253293@163.com>">
  <title>听歌实验室</title>
  <link type="image/x-icon" rel="shortcut icon" href="https://avatars3.githubusercontent.com/u/4074517?v=3&s=40" />
  <link rel="stylesheet" type="text/css" href="/lib/bootstrap/dist/css/bootstrap.min.css" media="screen">
  <link href="https://fonts.googleapis.com/css?family=Lato:300,400,700,300italic,400italic,700italic" rel="stylesheet" type="text/css">
  <link href="/css/landing-page.css" rel="stylesheet">
  <link href="/css/screenshots.css" rel="stylesheet">
  <style media="screen">
    #main {
      padding-top: 55px;
    }
  </style>
  <script type="text/javascript" src="/lib/jquery/dist/jquery.min.js"></script>
  <script type="text/javascript" src="/lib/html2canvas/dist/html2canvas.min.js"></script>
  <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
  <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
  <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
        <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>

<body>
  <!-- Navigation -->
  <nav class="navbar navbar-default navbar-fixed-top topnav" role="navigation">
    <div class="container topnav">
      <!-- Brand and toggle get grouped for better mobile display -->
      <div class="navbar-header">
        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
          <span class="sr-only">Toggle navigation</span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
        </button>
        <a class="navbar-brand topnav" href="/">
          <i class="fa fa-flask icon-3x" aria-hidden="true"></i> 听歌实验室
        </a>
      </div>
      <!-- Collect the nav links, forms, and other content for toggling -->
      <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
        <ul class="nav navbar-nav navbar-right">
          <li>
            <a href="/html/js.html">JavaScript/NodeJS</a>
          </li>
          <li>
            <a href="/index.html#agile">敏捷/项目管理(Agile/PMP)</a>
          </li>
          <li>
            <a href="/html/cloud-bi.html">云商业智能(Cloud BI)</a>
          </li>
          <li>
            <a href="/html/iot.html">物联网(WoT/IoT)</a>
          </li>
          <li>
            <a href="/html/me.html">关于我</a>
          </li>
        </ul>
      </div>
      <!-- /.navbar-collapse -->
    </div>
    <!-- /.container -->
  </nav>
  <div id="main" class="container">
    <div class="row">
      <div id="article" class="col-md-9 content-container">
        <h1 id="jetson-tk1-sandisk-128g-sd-">Jetson TK1 挂载 SanDisk 128G SD 卡</h1>
<p>[TOC]</p>
<p><img src="../img/sandisk.png" alt="128 G 闪迪实物"></p>
<h2 id="-0">列出块设备 0</h2>
<pre><code class="lang-shell">lsblk
</code></pre>
<p><img src="../img/sd-lsblk.png" alt="lsblk"></p>
<h2 id="-ext4-1">格式化为<em>ext4</em> 分区 1</h2>
<pre><code class="lang-shell">sudo mkfs.ext4 /dev/mmcblk1p1
</code></pre>
<h2 id="-sd-2">测试 SD 卡读写速度 2</h2>
<h3 id="-">磁盘读速度</h3>
<pre><code class="lang-shell">time dd if=/dev/mmcblk1 of=/dev/null bs=4096k count=2000 conv=sync
</code></pre>
<p><img src="../img/sd-read-4096-2000.png" alt=""></p>
<h3 id="-">磁盘写速度</h3>
<pre><code class="lang-shell">time dd if=/dev/zero of=/dev/mmcblk1 bs=4096k count=2000 conv=sync
</code></pre>
<p><img src="../img/sd-write-4096-2000.png" alt=""></p>
<p>以上测试 2000 个 4M 块的速度，可以通过改变 bs大小来分析不同级别块的性能。</p>
<h3 id="-">结论</h3>
<p>测试环境， TK 1、Linux tegra-ubuntu 3.10.40：</p>
<table>
<thead>
<tr>
<th>测试数据大小</th>
<th>读速度(单位：MB/s)</th>
<th>写速度(单位：MB/s)</th>
</tr>
</thead>
<tbody>
<tr>
<td>4096k * 2</td>
<td>63.0</td>
<td>130 ～ 273</td>
</tr>
<tr>
<td>4096k * 20</td>
<td>79.6</td>
<td>22.1 ～ 102</td>
</tr>
<tr>
<td>4096k * 200</td>
<td>81.3</td>
<td>43.1 ～ 44.5</td>
</tr>
<tr>
<td>4096k * 2000</td>
<td>85.0</td>
<td>19.2 ~ 20.3</td>
</tr>
</tbody>
</table>
<h2 id="-">参见</h2>
<ul>
<li><a href="https://www.youtube.com/watch?v=78LkdgbYo1s">Format SD Card as Ext4 - NVIDIA Jetson TK1</a></li>
<li><a href="https://linux.cn/article-6104-1.html">使用 dd 命令进行硬盘 I/O 性能检测</a></li>
</ul>

      </div>
      <div class="col-md-3" style="padding-top:20px;">
        <iframe src="http://githubbadge.appspot.com/tingge?a=0" style="border: 0;height: 142px;width: 200px;overflow: hidden;" frameBorder="0"></iframe>
      </div>
    </div>
  </div>
  <a id="html2canvas" title="截图下载-快照">&nbsp;</a>
  <script src="/lib/bootstrap/dist/js/bootstrap.min.js"></script>
  <script src="/js/article.js" charset="utf-8"></script>
  <!-- justice.js https://github.com/okor/justice  -->
  <script src="/lib/justice.min.js" charset="utf-8"></script>
  <!-- instantclick -->
  <script src="/lib/instantclick.js" charset="utf-8"></script>
  <script type="text/javascript" data-no-instant>
    Justice.init();
  </script>
</body>

</html>
